<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>基础数据管理-模板审核详情页面</title>
    <script src="/scripts/boot.js"></script>
    <style>
    	h1{
	    	height: 97px;
		    text-align: center;
		    line-height: 97px;
		    font-size: 28px;
		    font-weight: 600;
		    color: #3f4f5d;
		    margin-bottom: 10px;
    	}
    </style>
</head>
<body class="bg-white">
<div id="viewForm">
    <div class="title-div">
    <h1>计划模板审批</h1>
	<div class="title-list mb-20"><span class="title-listbg"></span><span>模板信息详情</span></div>
    <table class="table-bg" border="0" cellpadding="1" cellspacing="1" style="width:100%;table-layout:fixed;">
        <colgroup>
            <col width="135px"></col>
            <col width="50%"></col>
            <col width="135px"></col>
            <col width="50%"></col>
        </colgroup>
        <tr>
            <td class="text-titlebg">
                模板名称
            </td>
            <td>
                <div class="color-66 input-div" id="name"></div>
            </td>
            <td class="text-titlebg">
                模板类型
            </td>
            <td>
                <div class="color-66 input-div" id="type"></div>
            </td>
        </tr>
        <tr>
            <td class="text-titlebg noEmpty">说明</td>
            <td colspan="3" class="wp">
                <div class="color-66 textarea-div" id="remark"></div>
            </td>
        </tr>
    </table>
    
    </div>
    <!--<div class="mini-fit">-->
        <div id="datagrid1" class="mini-datagrid" style="width:100%;height:400px;"  url="/planTempData/listByPage" sizeList="[5,10,20,50]" pageSize="20"  idField="id" multiSelect="true" pagerButtons="buttons">
            <div property="columns">
                <div field="NO" width="40" headerAlign="center" align="center" allowSort="true">编号</div>
                <div field="busiMode" width="120" headerAlign="center" allowSort="true">业务模块</div>
                <div field="nodeName" width="120" headerAlign="center" allowSort="true">节点名称</div>
                <div field="nodeProperty" width="120" headerAlign="center" allowSort="true">节点性质</div>
                <div field="completeStandard" width="120" headerAlign="center" allowSort="true">完成标准</div>
                <div field="deadline" width="120" headerAlign="center" allowSort="true">工期</div>
                <div field="deadlineDesc" width="120" headerAlign="center" allowSort="true">工期说明</div>
                <div field="companyName" width="120" headerAlign="center" allowSort="true">公司名称</div>
                <div field="officeName" width="120" headerAlign="center" allowSort="true">部门名称</div>
                <div field="postName" width="120" headerAlign="center" allowSort="true">岗位</div>
                <div field="supervise" width="120" headerAlign="center" allowSort="true">监督岗位</div>
                <div field="remark" width="120" headerAlign="center" allowSort="true">说明</div>
            </div>
        </div>
    <!--</div>-->
    <div>
		<iframe id="workflowiframe" src=""  frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes" width="100%" frameborder="0" height="1200"></iframe>
	</div>
</div>
<script src="/scripts/res/js/common.js"></script>
<script type="text/javascript">
    var form;
    var view = {
        init: function () {
            mini.parse();
            form = new mini.Form("#viewForm");          
            if(view.getURLParameter("id")){
            	view.SetData({"id":view.getURLParameter("id")});
        	}
    	    if(view.getURLParameter("userId")){
    	        var userId=view.getURLParameter("userId");
    	    	var token=view.getURLParameter("token");
    	    	var taskName=view.getURLParameter("taskName");
    	    	var taskId=view.getURLParameter("taskId");
    	    	var taskDefKey=view.getURLParameter("taskDefKey");
    	    	var procInsId=view.getURLParameter("procInsId");
    	    	var procDefId=view.getURLParameter("procDefId");
    	    	var status=view.getURLParameter("status");
    	    	var id=view.getURLParameter("id");
    	    	
    	    	$('#workflowiframe').attr('src','http://114.242.165.90:15986/workflow/a/oa/testAudit/form?'+
    	    			'act.taskId='+taskId+
    	    			'&act.taskName='+taskName+
    	    			'&act.taskDefKey='+taskDefKey+
    	    			'&act.procInsId='+procInsId+
    	    			'&act.procDefId='+procDefId+
    	    			'&act.status='+status+
    	    			'&id='+id+
    	    			'&act.userId='+userId+
    	    			'&act.token='+token);
    	    }
        },
        getURLParameter: function (name) { 
			return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null;
		},
//    数据展示
        SetData: function (data) {
            data = mini.clone(data);
            grid = mini.get("datagrid1");
            $.ajax({
                url:"/planTemplete/info?id=" + data.id,
                type: "post",
                success: function (text) {
                    //跨页面传递的数据对象，克隆后才可以安全使用
                    var datas = mini.decode(text);   //反序列化成对象
                    $.each(datas.body[0],function (key,value) { 
                        $("#"+key).html(value);
                    });
                    common.unmask();
                }
            });
            var data = {
                    "planTemplete.id": data.id
             };
            grid.load(data)
        }
    };
    view.init();
</script>
</body>
</html>